package main.database;

import com.mongodb.client.FindIterable;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;
import main.GlobalConfig;
import org.bson.Document;
import static com.mongodb.client.model.Filters.eq;

import java.util.ArrayList;
import java.util.List;

public class MovieHelper {
    public static List<String[]> getMovieInfoFromArticleId(String id) {
        MongoCollection<Document> collection = DatabaseMan.Instance().GetCollection(GlobalConfig.collectionNameOfMovieOfArticle);
        FindIterable<Document> findIterable = collection.find(eq("articleid", id));
        MongoCursor<Document> cursor = findIterable.iterator();

        List<String[]> resultList = new ArrayList<>();
        if (cursor.hasNext()) {

        }
        return resultList;
    }
}
